<template>
    <div>
        <h1>登录页面</h1>
        <button @click="AddNum">Nunber++：{{ count }}</button>
        <!-- <input type="button" value="Nunber++：" @click="AddNum">{{ count }} -->
    </div>
</template>
<script setup lang="ts">
    //方式2组合式
    import { ref,reactive,onMounted } from "vue";
    
    var count=ref(0);

    function AddNum(){
        count.value++
    }

    onMounted(()=>{
        console.log("大家好");
    })

</script>
<!-- <script>
    //方式1选项式
    export default{
        data(){
            return{
                count:0
            }
        },
        methods:{
            AddNum(){
                this.count++
            }
        },
        mounted(){
            console.log("大家好");
        }
    }
</script> -->

<style scoped>

</style>